const Layout = () => import('@/layout/index.vue')
// 从指定目录下加载vue组件
const Category = () => import('@/views/product/category/index.vue')
const Brand = () => import('@/views/product/brand/index.vue')
const CategoryBrand = () => import('@/views/product/categoryBrand/index.vue')
const ProductSpec = () => import('@/views/product/spec/index.vue')
const Product = () => import('@/views/product/product/index.vue')
export default [
  {
    path: '/product',
    component: Layout,
    //每个路由的名称必须唯一：必须和后端菜单表中的组件名称相同
    name: 'product',
    meta: {
      title: '商品管理',
    },
    icon: 'Setting',
    children: [
      {
        path: 'category',
        name: 'category',
        component: Category,
        icon: 'UserFilled',
        meta: {
          title: '分类管理',
        },
      },
      {
        path: 'brand',
        name: 'brand',
        component: Brand,
        icon: 'UserFilled',
        meta: {
          title: '品牌管理',
        },
      },
      {
        path: 'categoryBrand',
        name: 'categoryBrand',
        component: CategoryBrand,
        icon: 'UserFilled',
        meta: {
          title: '分类品牌管理',
        },
      },
      {
        path: 'spec',
        name: 'productSpec',
        component: ProductSpec,
        icon: 'UserFilled',
        meta: {
          title: '商品规格',
        },
      },
      {
        path: 'product',
        name: 'product',
        component: Product,
        icon: 'UserFilled',
        meta: {
          title: '商品管理',
        },
      },
    ],
  },
]

// export default [
//   {
//     path: '/teacher',
//     component: Layout,
//     name: '讲师管理',
//     meta: {
//       title: 'teacher',
//     },
//     icon: 'icon-home',
//     children: [
//       {
//         path: '',
//         name: '讲师管理',
//         component: Teacher

//       },
//     ],
//   },
// ]
